/**************************************************
|	File:		CAnimationSystem.h
|	Author:		Jake Elmi
|	Course:		SGP Mari's Flower
|	Purpose:	This class is in charge of loading a
|			    a sprite sheet and rendering it
|				to the screen and updating
**************************************************/
#pragma once

#include <vector>
using namespace std;

class CFrames;

class CAnimation
{
	int nImageID;
	int  nNumFrames;
	bool bIsLooping;
	bool bIsPlaying;
	vector < CFrames* > vListOfFrames;

public:
	CAnimation(void);
	~CAnimation(void);
	CAnimation(const CAnimation&);
	CAnimation& operator = ( const CAnimation&);
	static CAnimation* GetInstance( void ) ;
	
	
	// Accessors
	int  GetImageID    ( void ) { return nImageID;   }
	int  GetNumFrames  ( void ) { return nNumFrames; }
	bool GetIsLooping  ( void ) { return bIsLooping; }
	bool GetIsPlaying  ( void ) { return bIsPlaying; }

	vector <CFrames*>  GetListOfFrames ( void ) { return vListOfFrames; }
	

	// Mutators
	void SetImageID   ( int i )  {  nImageID   = i; }
	void SetNumFrames ( int f )  {  nNumFrames = f; }
	void SetIsLooping ( bool l ) {  bIsLooping = l; }
	void SetIsPlaying ( bool p ) { bIsPlaying = p;  }

	void SetListofFrames( CFrames* f ) { vListOfFrames.push_back(f); }

	// Animation XML
	bool LoadAnimation( const char* fileName );
	CFrames*          myFrame;
	CAnimation*       myAnimation;
	CAnimation* pAnimation;
	int nAnimID;
};
